package entity;


import java.sql.Date;

public class Train {
    int trainId;
    String trainName;
    Date departureTime;
    Date arrivalTime;
    String startStation;
    String EndStation;
    String CarStatus;
    Seat seat;
    int ticket_status;

    public Train(int trainId,String trainName, Date departureTime, Date arrivalTime, String startStation, String endStation) {
        this.trainId = trainId;
        this.trainName = trainName;
        this.departureTime = departureTime;
        this.arrivalTime = arrivalTime;
        this.startStation = startStation;
        EndStation = endStation;
    }

    public Train() {

    }


    public int getTrainId() {
        return trainId;
    }

    public void setTrainId(int trainId) {
        this.trainId = trainId;
    }


    public String getTrainName() {
        return trainName;
    }

    public void setTrainName(String trainName) {
        this.trainName = trainName;
    }

    public Date getDepartureTime() {
        return departureTime;
    }

    public void setDepartureTime(Date departureTime) {
        this.departureTime = departureTime;
    }

    public java.sql.Date getArrivalTime() {
        return arrivalTime;
    }

    public void setArrivalTime(Date arrivalTime) {
        this.arrivalTime = arrivalTime;
    }

    public String getStartStation() {
        return startStation;
    }

    public void setStartStation(String startStation) {
        this.startStation = startStation;
    }

    public String getEndStation() {
        return EndStation;
    }

    public void setEndStation(String endStation) {
        EndStation = endStation;
    }

    public String getCarStatus() {
        return CarStatus;
    }

    public void setCarStatus(String carStatus) {
        CarStatus = carStatus;
    }

    public Seat getSeat() {
        return seat;
    }

    public void setSeat(Seat seat) {
        this.seat = seat;
    }

    public int getTicket_status() {
        return ticket_status;
    }

    public void setTicket_status(int ticket_status) {
        this.ticket_status = ticket_status;
    }

    @Override
    public String toString() {
        return "Train{" +
                "trainId=" + trainId +
                ", trainName='" + trainName + '\'' +
                ", departureTime=" + departureTime +
                ", arrivalTime=" + arrivalTime +
                ", startStation='" + startStation + '\'' +
                ", EndStation='" + EndStation + '\'' +
                ", CarStatus='" + CarStatus + '\'' +
                ", seat=" + seat +
                ", ticket_status=" + ticket_status +
                '}';
    }

    public String show(){

        return "火车信息："+"\n"+
                "火车序列号："+trainName+"\t"+
                "出发时间："+departureTime+"\t"+
                "到达时间："+arrivalTime+"\t"+
                "出发地："+startStation+"\t"+
                "目的地：" +EndStation+"\t"+
                "火车状态："+CarStatus+"\t"+
                "购票状态："+ticket_status+"\t";
    }
}
